<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>纽百特基础平台</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="${siteurl}plugins/sweetalert/sweetalert.css">

  <!-- Bootstrap 3.3.6 -->
  <style>
    .header {
      position: relative;
      margin: 0px;
      padding: 0px;
      min-height: 300px;
    }

    body {
      margin: 0px;
      padding: 0px;
    }


    .logo_layer {
      position: absolute;
      z-index: 100;
    }

    .logo {
      width: 200px;
      margin-top: 30px;
      margin-left: 150px;
    }

    .ad {
      position: absolute;
      z-index: 100;
      left: 150px;
      bottom: 130px;
    }

    .ad .h1 {
      font-size: 40px;
      font-weight: 600;
      color: #FFFFFF;
      line-height: 56px;
      margin-bottom: 30px;
    }

    .ad .h2 {
      width: 460px;
      font-size: 18px;
      font-weight: 500;
      color: #FFFFFF;
      line-height: 36px;
    }

    .banner_layer {
      position: absolute;
      z-index: 0;
      width: 100%;
    }

    .login-layer {
      position: absolute;
      z-index: 110;
      right: 0px;
      bottom: -50px;
      width: 350px;
      height: 318px;
      background: #FFFFFF;
      box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.11);
      border-radius: 10px;
      margin-right: 150px;
    }

    .banner {
      width: 100%;
    }


    .span-content {
      display: flex;
      justify-content: space-around;
      margin-bottom: 2.8rem;
      box-sizing: border-box;
    }

    .span-content span {
      border-bottom: 1px solid transparent;
    }

    .span-title {
      display: block;
      color: #666666;
      width: 5rem;
      padding: 0.8rem;
      font-size: 0.8rem;
      text-align: center;
    }

    .input {
      display: block;
      width: 300px;
      height: 2.9rem;
      border-radius: 2rem;
      border: 1px solid #c8c8c8;
      padding: 1rem;
      box-sizing: border-box;
      outline: none;
      margin-bottom: 1.8rem;
      margin-left: auto;
      margin-right: auto;
    }

    .input::-webkit-input-placeholder {
      font-size: 0.6rem !important;
      color: #999999 !important;
    }

    .input-btn {
      padding: 0;
      background: #4a90e2;
      color: #FFFFFF;
      border: none;
      font-size: 1.1rem;
      /*line-height: ;*/
    }

    .price {
      padding-top: 25px;
      padding-left: 150px;
      background: #F6F8FA;
      width: 100%;
      box-sizing: border-box;
      padding-bottom: 20px;
      margin-top: -5px;
    }

    .price .h1 {
      font-size: 30px;
      font-weight: 400;
      color: #333333;
      line-height: 45px;
    }

    .price .h2 {
      font-size: 15px;
      font-weight: 400;
      color: #333333;
      line-height: 40px;
    }

    .footer {
      padding-top: 18px;
      padding-left: 150px;
      background: #FFFF;
      width: 100%;
      box-sizing: border-box;
    }


    .footer .h1 {
      font-size: 14px;
      font-weight: 400;
      color: #666666;
      line-height: 30px;
      text-decoration: none;
    }
  </style>
</head>

<body>
  <div class="header" id="header">
    <div class="logo_layer">
      <img class="logo" alt="" src="${siteurl}dist/newbyte/logo.png">
    </div>
    <img class="banner" id="banner" alt="banner" src="${siteurl}dist/newbyte/banner.jpg">
    <div class="ad">
      <div class="h1">纽百特基础平台</div>
      <div class="h2">纽百特，致力于软件开发和数据技术，为客户创造价值，“承诺，专注，开放，共识，共赢”是我们核心价值观。纽百特，全球领先的软件服务商，为你，为我！</div>
    </div>
    <div class="login-layer">
      <div class="span-content">
        <span class="span-title" id="login-title" style="border-bottom-color: rgb(74, 144, 226);">
          登录
        </span>
        <span class="span-title" id="register-title">
          注册
        </span>
      </div>
      <form role="form" action="${siteurl}login.htm" method="post">
        <div class="login-content" id="login-content">
          <input id="username" class="input" type="text" value="" placeholder="用户名" placeholder-class="place-style">
          <input id="password" class="input" type="password" value="" placeholder="密码" placeholder-class="place-style">
          <button class="input input-btn" type="button" id="submit" value="登录">登录</button>
        </div>
      </form>
    </div>



  </div>

  <div class="price">
    <div class="h1">我们的价值观</div>
    <div class="h2">承诺，专注，开放，共识，共赢</div>
  </div>
  <div class="footer">
    <a class="h1" href="http://www.newbyte.ltd/">©2019-${.now?string("yyyy")} 西安纽百特科技有限公司</a>
  </div>

  <!-- /.login-box -->

  <!-- jQuery 2.2.3 -->
  <script src="${siteurl}plugins/jQuery/jquery-2.2.3.min.js"></script>
  <script src="${siteurl}plugins/sweetalert/sweetalert.min.js"></script>

  <script type="text/javascript">




    $(document).ready(function () {
      $("#submit").click(function () {
        var username = $("#username").val();
        var password = $("#password").val();
        var params = {};
        params.username = username;
        params.password = password;

        $.post("${siteurl}loginAjax.htm", params, function (res) {
          if (res.code == 0) {
            window.location.href = "${siteurl}admin/index.htm"
          } else {
            swal(res.msg + "!", "", "error")
            $("#password").val("");
          }
        });

      });

      $("#password").keyup(function (event) {
        var password = $("#password").val();
        if (password == "" || password.length < 5) {
          return;
        }
        if (event.keyCode == 13) {
          $("#submit").click();
        }
      });
      //var banner = $("#banner");
      //var height = banner.height();
      //$("#header").height(height);


    });

  </script>


</body>

</html>